import 'package:flutter_ncsjqz_getx/generated/json/base/json_convert_content.dart';
import 'package:flutter_ncsjqz_getx/model/wallet_detail_entity.dart';

WalletDetailEntity $WalletDetailEntityFromJson(Map<String, dynamic> json) {
	final WalletDetailEntity walletDetailEntity = WalletDetailEntity();
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		walletDetailEntity.msg = msg;
	}
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		walletDetailEntity.code = code;
	}
	final WalletDetailData? data = jsonConvert.convert<WalletDetailData>(json['data']);
	if (data != null) {
		walletDetailEntity.data = data;
	}
	return walletDetailEntity;
}

Map<String, dynamic> $WalletDetailEntityToJson(WalletDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['msg'] = entity.msg;
	data['code'] = entity.code;
	data['data'] = entity.data?.toJson();
	return data;
}

WalletDetailData $WalletDetailDataFromJson(Map<String, dynamic> json) {
	final WalletDetailData walletDetailData = WalletDetailData();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		walletDetailData.id = id;
	}
	final int? userId = jsonConvert.convert<int>(json['userId']);
	if (userId != null) {
		walletDetailData.userId = userId;
	}
	final int? totalAmount = jsonConvert.convert<int>(json['totalAmount']);
	if (totalAmount != null) {
		walletDetailData.totalAmount = totalAmount;
	}
	final int? frozenAmount = jsonConvert.convert<int>(json['frozenAmount']);
	if (frozenAmount != null) {
		walletDetailData.frozenAmount = frozenAmount;
	}
	final int? enableAmount = jsonConvert.convert<int>(json['enableAmount']);
	if (enableAmount != null) {
		walletDetailData.enableAmount = enableAmount;
	}
	return walletDetailData;
}

Map<String, dynamic> $WalletDetailDataToJson(WalletDetailData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['userId'] = entity.userId;
	data['totalAmount'] = entity.totalAmount;
	data['frozenAmount'] = entity.frozenAmount;
	data['enableAmount'] = entity.enableAmount;
	return data;
}